﻿using System;
using System.Collections.Generic;
using System.Text;

namespace System.Peppers.Win32
{
    /// <summary>
    /// Class containing info about a shared drive
    /// </summary>
    public sealed class NetworkDriveInfo
    {
        private NETRESOURCE _resource = null;

        internal NetworkDriveInfo(NETRESOURCE resource)
        {
            _resource = resource;
        }

        /// <summary>
        /// Drive letter of mapping
        /// </summary>
        public char DriveLetter
        {
            get { return _resource.lpLocalName[0]; }
        }

        /// <summary>
        /// Remote path of mapping
        /// </summary>
        public string RemotePath
        {
            get { return _resource.lpRemoteName; }
        }

        /// <summary>
        /// Network provider of mapping
        /// </summary>
        public string Provider
        {
            get { return _resource.lpProvider; }
        }

        /// <summary>
        /// Comment for mapping
        /// </summary>
        public string Comment
        {
            get { return _resource.lpComment; }
        }
    }
}
